import request from '@/utils/request'
// 申请事项办事指南 API接口
const std_guideApi = {
    list: '/std_guide/list',
    save: '/std_guide/save',
    view: '/std_guide/view',
    del: '/std_guide/delete',
    dels: '/std_guide/batchDel',
    output: '/std_guide/output',
    exportExcelTemplate: '/std_guide/exportExcelTemplate',
    importExcel: '/std_guide/importExcel'
}

/**
 * 导入申请事项办事指南Excel
 */
export function importExcel(data) {
  var body = new FormData()
  body.append("file", data);
  return request({
    url: std_guideApi.importExcel,
    headers: {"Content-Type": "multipart/form-data"},
    method: 'post',
    data: body
  })
}

/**
 * 导出申请事项办事指南Excel模板
 */
export function exportExcelTemplate () {
    return request({
        url: std_guideApi.exportExcelTemplate,
        method: 'post',
        responseType: 'blob'
    })
}

/**
 * 导出申请事项办事指南
 */
export function output (data) {
    return request({
        url: std_guideApi.output,
        method: 'post',
        data: data ,
        responseType: 'blob'
    })
}
/**
 * 批量删除申请事项办事指南
 * @param {*} ids
 */
export function delStd_guides (ids) {
    return request({
        url: std_guideApi.dels,
        method: 'post',
        params: {ids}
    })
}
/**
 * 删除申请事项办事指南
 * @param {*} id
 */
export function delStd_guide (id) {
    return request({
        url: std_guideApi.del,
        method: 'post',
        params: {id}
    })
}
/**
 * 查看、编辑申请事项办事指南
 * @param {*} id
 */
export function viewStd_guide (id) {
    return request({
        url: std_guideApi.view,
        method: 'get',
        params: {id}
    })
}
/**
 * 保存申请事项办事指南
 * @param {*} body
 */
export function saveStd_guide (body) {
    return request({
        url: std_guideApi.save,
        method: 'post',
        data: body
    })
}
/**
 * 查询申请事项办事指南列表
 * @param {*} body
 */
export function queryStd_guideList (body) {
    return request({
        url: std_guideApi.list,
        method: 'post',
        data: body
    })
}